/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.product;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.product.ProductViewMapper;
public class ProductView extends BaseAction
{
    @Autowired(required=false)
	private ProductViewMapper mapper;
    /**
    产品统计图
    */
    
    public Map cartogramProduct() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        result.put("s_search", pagination.getSearchParas());
        
        
        
        
        result.putAll(super.listDepartments());
        
        
        SQLList<SQLMap> classid=mapper.classid(params);
        result.put("classid", classid);
        
        
        SQLList<SQLMap> all=mapper.all(params);
        result.put("all", all);
        
        
        SQLList<SQLMap> parent=mapper.parent(params);
        SQLMap parent_emt=parent.getExistfirst();
        result.put("parent", parent_emt);
        
        
        
        
        tb = createTreeBean("l_class_treecols");
        tb.setPid(1);
        SQLList<SQLMap> l_class=mapper.l_class(params);
        l_class = l_class.buildTree(tb,tb.getPid());
        result.put("l_class", l_class);
        
        return result;
    }
    /**
    */
    
    public Object produce() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params,pagination);
        produce.setPagedListInfo(pagination);
        result.put("produce", produce);
        
        return produce;
    }
    /**
    选择图片
    */
    
    public Map productChoiceUploadPage() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> image=mapper.image(params);
        result.put("image", image);
        
        
        
        return result;
    }
    /**
    饼状统计图
    */
    
    public Map technologyPancake() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> s_c=mapper.s_c(params);
        result.put("s_c", s_c);
        
        return result;
    }
    /**
    产品饼状统计图
    */
    
    public Map productPieChart() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> s_c=mapper.s_c(params);
        result.put("s_c", s_c);
        
        return result;
    }
    /**
    产品搜索
    */
    
    public Map productSearchLists() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("s_search", pagination.getSearchParas());
        
        
        
        return result;
    }
    /**
    产品列表
    */
    
    public Map productList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_list=mapper.p_list(params,pagination);
        p_list.setPagedListInfo(pagination);
        result.put("p_list", p_list);
        
        return result;
    }
    /**
    */
    
    public Map i_store() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_store = mapper.i_store(params);
        result.put("i_store", i_store);
        
        return result;
    }
    /**
    */
    
    public Map u_pc() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_pc(params);
        
        return result;
    }
    /**
    */
    
    public Map d_pi() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_pi(params);
        
        return result;
    }
}